//package com.qf.index;
//
//import cn.hutool.json.JSONUtil;
//import com.alibaba.fastjson.JSONObject;
//
//import java.util.List;
//
//public class TestFuleiJiexi {
//    public static void main(String[] args) {
//        String line = "data: {\"choices\":[{\"delta\":{\"content\":\"yn\\\": \\\"是\"},\"finish_reason\":null,\"index\":0,\"logprobs\":null}],\"object\":\"chat.completion.chunk\",\"usage\":null,\"created\":1739411692,\"system_fingerprint\":null,\"model\":\"qwen-plus-latest\",\"id\":\"chatcmpl-f1258b20-7ddb-9952-a1ae-a8e4acf1a388\"}";
//        StringBuilder stringBuilder = new StringBuilder();
//        line = line.replaceAll("data: ", "").trim();
//        TongYiApi.ChatCompletionChunk chatCompletionChunk = JSONObject.parseObject(line, TongYiApi.ChatCompletionChunk.class);
//        List<TongYiApi.Choice> choices = chatCompletionChunk.getChoices();
//        for (TongYiApi.Choice choice : choices) {
//            String content = choice.getDelta().getContent().replaceAll("\n\n", "\n");
//            stringBuilder.append(content);
//        }
//        System.out.println(stringBuilder.toString());
//    }
//
//}
